import redis

# redis 连接测试

# 服务端ip
host = "127.0.0.1"

# 端口号
port = 6379

# 获取连接
conn = redis.Redis(host=host, port=port)

# 获取连接池
conn_pool = redis.ConnectionPool(host=host, port=port)

conn1 = redis.Redis(connection_pool=conn_pool, decode_responses=True)
conn.set("name1", "wt1")
print(conn)
print(conn1)
